package github.ziwukun.jsonql.utils;

import com.fasterxml.jackson.databind.ObjectMapper;

public class JacksonUtils {
	private static ObjectMapper om = new ObjectMapper();
	
	
	public static <T> T read(String json,Class<T> type) {
		try {
			return om.readValue(json, type);
		} catch (Exception e) {
			throw new RuntimeException("json字符串读取失败",e);
		}
	}
}
